﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BF.IBLL.BaseSystem;
using BF.Model;
using System.Linq.Expressions;
using BF.Infrastructure;
using BF.IDAL.BaseSystem;

namespace BF.BLL.BaseSystem
{
    public class View_sys_UserInfo_BLL : Iview_sys_UserInfo_BLL
    {
        private readonly IView_SysUserInfoDAL iDalSysUserInfo;
        private readonly IUnitOfWork<WSJD_BaseFrameworkEntities> uwork;
        public View_sys_UserInfo_BLL(IUnitOfWork<WSJD_BaseFrameworkEntities> uwork, IView_SysUserInfoDAL iDalSysUserInfo)
        {
            this.iDalSysUserInfo = iDalSysUserInfo;
            this.uwork = uwork;
            //this.uwork.LogEvent = new LogEventHandler(Sys_LogBLL.WriteLog);
        }
        /// <summary>
        /// 获取数据列表(分页)
        /// </summary>
        /// <param name="where">条件</param>
        /// <param name="orderBy">排序字段</param>
        /// <param name="pageModel">分页实体</param>
        /// <param name="isAscending">是否升序排列</param>
        /// <returns></returns>
        public List<View_SysUserInfo> GetList(Expression<Func<View_SysUserInfo, bool>> where, Expression<Func<View_SysUserInfo, object>> orderBy, PageModel pageModel, bool isAscending)
        {
            return iDalSysUserInfo.GetList(where, orderBy, pageModel, isAscending);
        }

        /// <summary>
        /// 获取数据条数
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public int GetRowCount(Expression<Func<View_SysUserInfo, bool>> where)
        {
            return iDalSysUserInfo.GetRowCount(where);
        }

        #region Iview_sys_UserInfo_BLL 成员


        public List<View_SysUserInfo> GetList(Expression<Func<View_SysUserInfo, bool>> where)
        {
            return iDalSysUserInfo.GetList(where);
        }

        #endregion
    }
}
